package com.nchu.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class OrderDto {
//    校验
    @NotNull(message = "用户ID不能为空！")
    private Integer uid;

    @NotNull(message = "产品ID不能为空！")
    private Integer productId;

    @NotNull(message = "销售额不能为空！")
    @Min(value = 1, message = "销售额必须大于0！")
    private Integer saleNum;
}
